<?php

declare(strict_types=1);

namespace App\Constants\Admin;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

#[Constants]
class AdminLogCode extends AbstractConstants
{
    /**
     * @Message("model.admin_log.type.view")
     */
    const TYPE_VIEW = 1;

    /**
     * @Message("model.admin_log.type.create")
     */
    const TYPE_CREATE = 2;

    /**
     * @Message("model.admin_log.type.edit")
     */
    const TYPE_EDIT = 3;

    /**
     * @Message("model.admin_log.type.export")
     */
    const TYPE_EXPORT = 4;

    /**
     * @Message("model.admin_log.type.login")
     */
    const TYPE_LOGIN = 5;

    /**
     * @Message("model.admin_log.type.password")
     */
    const TYPE_PASSWORD = 6;

    /**
     * @Message("model.admin_log.type.delete")
     */
    const TYPE_DELETE = 7;

    /**
     * @Message("model.admin_log.type.logon")
     */
    const TYPE_LOGON = 8;

    /**
     * 类型
     * @var string[]
     */
    public static $typeMap = [
        self::TYPE_VIEW,
        self::TYPE_CREATE,
        self::TYPE_EDIT,
        self::TYPE_EXPORT,
        self::TYPE_LOGIN,
        self::TYPE_PASSWORD,
        self::TYPE_DELETE,
        self::TYPE_LOGON
    ];
}
